﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000CCB RID: 3275
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class OptionalReward : IMessage<OptionalReward>, IMessage, IEquatable<OptionalReward>, IDeepCloneable<OptionalReward>, IBufferMessage
	{
		// Token: 0x17002931 RID: 10545
		// (get) Token: 0x06009246 RID: 37446 RVA: 0x001843F0 File Offset: 0x001825F0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<OptionalReward> Parser
		{
			get
			{
				return OptionalReward._parser;
			}
		}

		// Token: 0x17002932 RID: 10546
		// (get) Token: 0x06009247 RID: 37447 RVA: 0x001843F7 File Offset: 0x001825F7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return OptionalRewardReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17002933 RID: 10547
		// (get) Token: 0x06009248 RID: 37448 RVA: 0x00184409 File Offset: 0x00182609
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return OptionalReward.Descriptor;
			}
		}

		// Token: 0x06009249 RID: 37449 RVA: 0x00184410 File Offset: 0x00182610
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public OptionalReward()
		{
		}

		// Token: 0x0600924A RID: 37450 RVA: 0x00184418 File Offset: 0x00182618
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public OptionalReward(OptionalReward other) : this()
		{
			this.optionalRewardId_ = other.optionalRewardId_;
			this.level_ = other.level_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x0600924B RID: 37451 RVA: 0x00184449 File Offset: 0x00182649
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public OptionalReward Clone()
		{
			return new OptionalReward(this);
		}

		// Token: 0x17002934 RID: 10548
		// (get) Token: 0x0600924C RID: 37452 RVA: 0x00184451 File Offset: 0x00182651
		// (set) Token: 0x0600924D RID: 37453 RVA: 0x00184459 File Offset: 0x00182659
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint OptionalRewardId
		{
			get
			{
				return this.optionalRewardId_;
			}
			set
			{
				this.optionalRewardId_ = value;
			}
		}

		// Token: 0x17002935 RID: 10549
		// (get) Token: 0x0600924E RID: 37454 RVA: 0x00184462 File Offset: 0x00182662
		// (set) Token: 0x0600924F RID: 37455 RVA: 0x0018446A File Offset: 0x0018266A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x06009250 RID: 37456 RVA: 0x00184473 File Offset: 0x00182673
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as OptionalReward);
		}

		// Token: 0x06009251 RID: 37457 RVA: 0x00184481 File Offset: 0x00182681
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(OptionalReward other)
		{
			return other != null && (other == this || (this.OptionalRewardId == other.OptionalRewardId && this.Level == other.Level && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06009252 RID: 37458 RVA: 0x001844C0 File Offset: 0x001826C0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.OptionalRewardId != 0U)
			{
				num ^= this.OptionalRewardId.GetHashCode();
			}
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06009253 RID: 37459 RVA: 0x00184518 File Offset: 0x00182718
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06009254 RID: 37460 RVA: 0x00184520 File Offset: 0x00182720
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06009255 RID: 37461 RVA: 0x0018452C File Offset: 0x0018272C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Level != 0U)
			{
				output.WriteRawTag(64);
				output.WriteUInt32(this.Level);
			}
			if (this.OptionalRewardId != 0U)
			{
				output.WriteRawTag(80);
				output.WriteUInt32(this.OptionalRewardId);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06009256 RID: 37462 RVA: 0x00184588 File Offset: 0x00182788
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.OptionalRewardId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.OptionalRewardId);
			}
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06009257 RID: 37463 RVA: 0x001845E0 File Offset: 0x001827E0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(OptionalReward other)
		{
			if (other == null)
			{
				return;
			}
			if (other.OptionalRewardId != 0U)
			{
				this.OptionalRewardId = other.OptionalRewardId;
			}
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06009258 RID: 37464 RVA: 0x00184630 File Offset: 0x00182830
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06009259 RID: 37465 RVA: 0x0018463C File Offset: 0x0018283C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num != 64U)
				{
					if (num != 80U)
					{
						this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
					}
					else
					{
						this.OptionalRewardId = input.ReadUInt32();
					}
				}
				else
				{
					this.Level = input.ReadUInt32();
				}
			}
		}

		// Token: 0x040037BF RID: 14271
		private static readonly MessageParser<OptionalReward> _parser = new MessageParser<OptionalReward>(() => new OptionalReward());

		// Token: 0x040037C0 RID: 14272
		private UnknownFieldSet _unknownFields;

		// Token: 0x040037C1 RID: 14273
		public const int OptionalRewardIdFieldNumber = 10;

		// Token: 0x040037C2 RID: 14274
		private uint optionalRewardId_;

		// Token: 0x040037C3 RID: 14275
		public const int LevelFieldNumber = 8;

		// Token: 0x040037C4 RID: 14276
		private uint level_;
	}
}
